package com.lxj.xpopup.custom;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lxj.xpopup.R;
import com.lxj.xpopup.impl.PartShadowPopupView;

/**
 * @author $ liguochao
 * @fileName MyPopupWindow
 * @date2021/4/30 17:03
 * @describe TODO
 * @desc 自定义popupwindow
 */
public class MyPopupWindow extends PartShadowPopupView {

    public MyPopupWindow(@NonNull Context context) {
        super(context);
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.custom_my_popup_window_view;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        final TextView tv = findViewById(R.id.tv);
        findViewById(R.id.button).setOnClickListener(new View.OnClickListener(){

            @Override
            public void onClick(View view) {
                tv.setText("我改变了");
            }
        });
    }
}
